package com.ordertracker.persistent.dictionary.template;


import com.ordertracker.persistent.constant.SEX;
import com.ordertracker.persistent.dictionary.IPerson;
import com.ordertracker.persistent.dictionary.template.OptimisticLockTemplate;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

/**
 * Description of class.
 * Created 12/5/12 5:53 PM
 *
 * @author andrey.rodin@playtech.com
 */

@MappedSuperclass
public abstract class AbstractPersonTemplate extends StateEntityTemplate implements IPerson {

    @Column(nullable = false)
    private String firstName;

    @Column(nullable = false)
    private String lastName;

    @Column(nullable = false)
    private byte old;

    @Column
    private String contactPhone;

    @Column(length = 1, nullable = false)
    private SEX gender;

    public String getFirstName() {
        return firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public byte getOld() {
        return old;
    }

    public String getContactPhone() {
        return contactPhone;
    }

    public SEX getGender() {
        return gender;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public void setOld(byte old) {
        this.old = old;
    }

    public void setContactPhone(String contactPhone) {
        this.contactPhone = contactPhone;
    }

    public void setGender(SEX gender) {
        this.gender = gender;
    }
}
